package main

import (
	"go_20210605/router"
	"go_20210605/server"
)

func main() {
	// err test
	//router.Router01()

	// errgroup test
	//router.Router02()

	// 04 wire server
	serverinit()
}

func serverinit() {
	server01 := server.InitializeMyServer()
	server01.Server.Addr = ":8080"
	server01.Name = "app01"
	server01.Server.Handler = router.NewRouter()
	server02 := server.InitializeMyServer()
	server02.Server.Addr = ":8090"
	server02.Name = "app02"
	server02.Server.Handler = router.NewRouter()
	manageServer := server.NewManageServer()
	manageServer.RegisterServer(server01, server02)
	manageServer.StartServer()
}
